Skip to content

docs(gestures): make swipe/gesture/longpress discoverable and honest in MCP metadata - #4748

Merged
thymikee merged 2 commits into
mainfrom
t3/clarify-gesture-discovery
Nov 19, 2026
Merged

thymikee merged 2 commits into
mainfrom
t3/clarify-gesture-discovery

Conversation

@thymikee

@thymikee thymikee commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Text and metadata only — no behavior change. An MCP client that defers tool schemas finds tools by keyword search over the tool name, description, and _meta searchHint, and three gesture entries misled that search:

  • swipe had searchHint: "drag gesture", but a swipe is a quick coordinate fling with no hold, so drag-to-reorder via swipe fails. Hint is now flick slide carousel page; the MCP description now states the contact starts moving immediately with no pause, and --help points to gesture drag @src @dst for a held move.
  • gesture had searchHint: "multi-touch zoom", hiding that gesture drag exists and holds its source down first (DEFAULT_DRAG_SOURCE_HOLD_MS = 800 ms). Hint gains reorder (a hint may only add words the name and description lack); the MCP description now says a drag holds the source for 800 ms by default before carrying it over.
  • longpress hint stays long press: its description already covers hold and context menu.
  • help gestures had no drag-to-reorder line; it now shows agent-device gesture drag @e12 @e40 plus the hold-first semantics.

Touched files: 3 (packages/command-surface/src/interaction/index.ts, packages/command-surface/src/interaction/metadata.ts, src/commands/schema/cli-help-gestures.ts). The always-loaded 'loop' tier is untouched: tools/list always-loaded payload is 22400 of 22528 budget bytes, and the loading-meta tests (searchHint rules, byte budget) pass.

Validation

Tested SHA: 658284d0b7f493d405aead3c0d4d5e1cb45686e3 (branch build node bin/agent-device.mjs).

  • vitest run --project unit-core on src/mcp/__tests__/command-tools-loading-meta.test.ts, src/__tests__/cli-help.test.ts, src/commands/schema/cli-help-topics.test.ts, cli-help-command-usage.test.ts, command-descriptor-parity.test.ts, packages/command-surface/src/interaction, src/mcp — all pass (113 + 260 tests), plus --project output-economy (33). pnpm format run.
  • Branch-built CLI tools/list probe shows the new hints/descriptions; always-loaded byte budget green (22400 <= 22528).
  • Device validation (branch-built CLI could not speak the T3 host daemon's RPC protocol, so device actions ran through the device_open-returned agent-device command pinned to the same devices/sessions; the changed text itself was verified from the branch build):
Command Device / app Result Text matches
swipe 370 273 60 273 iOS sim iPhone 17, Reminders (native) Swipe left on "Call bank" row revealed "Show Details" + "Delete" row actions yes
longpress @e9 1000 iOS sim, Reminders row (native) Context menu opened: Details, Delete, Mark as Completed, Deadline, Move To List, Priority, Cut, Copy yes
gesture drag @e13 @e7 iOS sim, Reminders (native) List reordered (Call bank row 3 -> row 2); hold-first engaged reorder yes
swipe 340 437 60 437 iOS sim, Safari tab overview (native) Horizontal swipe panned tab-group carousel (selected "10 Tabs" -> "9 Tabs") yes
longpress @e9 1200 Android emulator-5554, Pixel launcher icon (native) App context menu: App info / Pause app / Widgets yes
swipe 1000 1189 200 1189 Android, notification shade row (native system UI) "Serial console enabled" notification dismissed by the swipe yes
gesture drag 'text="Espanol (Estados Unidos)"' 'text="English (United States)"' + confirm dialog Android, Settings > System > Languages (native) Languages reordered (dialog "Change system language?", Espanol became first; reverted back) yes
swipe 980 880 120 880 Android, Chrome NTP shortcuts carousel (native) Carousel panned horizontally (later shortcuts revealed) yes
swipe 302 822 778 822, then gesture drag @e14 @e16 Android, examples/test-app GestureLab swipe -> "drag completed no"; gesture drag -> "drag completed yes" yes — swipe does not hold, drag does
longpress @e20 900 Android, test-app /automation "Long press canary" (RN Pressable onLongPress) "Last input: longpress", "Long presses: 1" yes
swipe 112 361 289 361, then gesture drag @e11 @e12 iOS sim, examples/test-app GestureLab swipe -> "drag completed no"; gesture drag -> "drag completed yes" yes
longpress @e14 900 iOS sim, test-app /automation "Last input: longpress", "Long presses: 1" yes

Findings (not papered over): in Google Clock on Android 15 a horizontal swipe on an alarm card expands the card (revealing Delete inside) rather than a swipe action, so the Android swipe-reveals-row-action case used the notification shade; the test-app GestureLab pan/fling over "Gesture test image" did not register on either platform (the target sits inside the home ScrollView) — unrelated to the changed text. CI obligations: full pnpm check runs on this PR; focused tests above cover the touched files.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.41 MB 6.40 MB -11.2 kB
Package (unpacked) 6.41 MB 6.40 MB -11.2 kB
Package (download) 1.95 MB 1.94 MB -3.6 kB

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 21.8 ms 19.5 ms -2.3 ms
CLI --help 44.1 ms 50.1 ms +6.0 ms

@apex-sentinel-staging

This comment has been minimized.

…in MCP metadata

An MCP client that defers tool schemas finds tools by keyword search over
name, description, and searchHint. Three gesture entries misled that
search:

- swipe carried searchHint "drag gesture", but a swipe is a quick
  coordinate fling with no hold, so drag-to-reorder via swipe fails.
  The hint is now "flick slide carousel page" and the description states
  the contact starts moving immediately with no pause.
- gesture carried "multi-touch zoom", hiding that gesture drag exists
  and holds its source down first (DEFAULT_DRAG_SOURCE_HOLD_MS = 800).
  The hint gains "reorder move row" and the MCP description now says a
  drag holds the source for 800 ms by default before carrying it over.
- longpress hint was just "long press"; it now also carries home screen
  icon widget app task words.
- help gestures had no line for drag-to-reorder; it now shows
  "gesture drag @E12 @e40" plus the hold-first semantics.

Text and metadata only; no behavior change, no change to the always-loaded
'loop' tier (always-loaded tools/list stays at 22400 of 22528 bytes).

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@thymikee
thymikee force-pushed the t3/clarify-gesture-discovery branch from fd5063b to 658284d Compare November 19, 2026 14:05
@apex-sentinel-staging

This comment has been minimized.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@apex-sentinel-staging

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve · review of d61e2f0

Since the review of 658284d: 0 new · 0 still open · 0 no longer raised

No open findings.

Not in the reviewers' prompt (3 files)
  • packages/command-surface/src/interaction/index.ts: no reviewer was selected for this change
  • packages/command-surface/src/interaction/metadata.ts: no reviewer was selected for this change
  • src/commands/schema/cli-help-gestures.ts: no reviewer was selected for this change

Reviewed with this repository's own Sentinel configuration (7b6500cd2da2).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at d61e2f0. The help and metadata changes are accurate, and all 17 checks pass, including the cli-help and loading-meta tests that cover these strings. There are no conflicts.

Not blocking: line 26 of cli-help-gestures.ts still says "for drag series", right next to the new line saying swipe never starts a reorder. You could reword it to "repeated swipes", or leave it. Also, the PR body's validation ran on an earlier head, 658284d.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 19, 2026
@thymikee
thymikee merged commit eeff795 into main Nov 19, 2026
17 checks passed
@thymikee
thymikee deleted the t3/clarify-gesture-discovery branch November 19, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant